package com.heima.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.heima.mapper.BusinessMapper;
import com.heima.pojo.Business;
import com.heima.pojo.Node;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/vm-service")
@Slf4j
public class BusinessController {
    @Autowired
    private BusinessMapper businessMapper;
    /**
     * 新增商圈
     * @return
     */
    @GetMapping("/businessType")
    public List<Business> selectBusiness(){
        LambdaQueryWrapper<Business> wrapper = new LambdaQueryWrapper<>();
        List<Business> businesses = businessMapper.selectList(wrapper);
        return businesses;
    }
}
